package org.ucas.faker.web.exceptions;

import org.springframework.http.HttpStatus;

/**
 * Created by suemi on 17-7-9.
 */
public class RestException extends FakerException {
  private static final long serialVersionUID = 1L;

  public final ErrCode errCode;

  public RestException(ErrCode errCode) {
    super(errCode.getMessage());
    this.errCode = errCode;
  }

  public HttpStatus getHttpStatus() {
    return errCode.getStatus();
  }

  public ErrCode getErrCode() {
    return errCode;
  }
}
